﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace FCNS.KeepMoney.Forms
{
    public partial class IconListForm : ParentForm
    {
        public IconListForm()
        {
            InitializeComponent();
            listViewEx1.LargeImageList = Program.ImagesList;
            Program.Translation.ApplyTo(this);
        }

        public int IconIndex
        {
            get
            {
                if (listViewEx1.SelectedIndices.Count > 0)
                    return listViewEx1.SelectedIndices[0];
                else
                    return listViewEx1.Items[0].Index;
            }
        }

        private void OnFormLoad(object sender, EventArgs e)
        {
            this.Icon = Properties.Resources.rmb;

            for (int i = 0; i < Program.ImagesList.Images.Count; i++)
                listViewEx1.Items.Add(new ListViewItem(i.ToString(), i));
        }

        private void buttonOk_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
        }
    }
}
